home *** CD-ROM | disk | FTP | other *** search
- class TeleportingEnemy extends Enemy
- {
- var mc;
- var targetCoords;
- var tm;
- var health;
- static var SCORE = 200;
- static var SHOTS = 3;
- static var WAIT_TIME = 180;
- static var ENEMY_TYPE = "enemy5";
- static var MAX_HEALTH = 2;
- static var COLOR = 16711935;
- function TeleportingEnemy(x, y)
- {
- super(x,y);
- this.mc._x = this.targetCoords.x;
- this.mc._y = this.targetCoords.y;
- this.mc.gotoAndPlay("teleport");
- }
- function getScore()
- {
- return TeleportingEnemy.SCORE;
- }
- function getEnemyType()
- {
- return TeleportingEnemy.ENEMY_TYPE;
- }
- function getWaitTime()
- {
- return TeleportingEnemy.WAIT_TIME;
- }
- function getMaxHealth()
- {
- return TeleportingEnemy.MAX_HEALTH;
- }
- function getColor()
- {
- return TeleportingEnemy.COLOR;
- }
- function createTrailManager()
- {
- this.tm = null;
- }
- function rotateToPlayer()
- {
- this.mc._rotation += 3;
- }
- function createNewMissile()
- {
- SoundManager.teleport();
- var _loc3_ = 0;
- while(_loc3_ < TeleportingEnemy.SHOTS)
- {
- new FastMissile(this.mc._x,this.mc._y,this.mc._rotation + _loc3_ * 120);
- _loc3_ = _loc3_ + 1;
- }
- this.assignNewTarget();
- this.mc._x = this.targetCoords.x;
- this.mc._y = this.targetCoords.y;
- this.mc.gotoAndPlay("teleport");
- _root.attachMovie("blink","blink" + _root.getNextHighestDepth(),_root.getNextHighestDepth());
- this.health = this.getMaxHealth();
- }
- }
-